package com.kb.design.controller.chart;

import com.kb.design.common.ApiResponse;
import com.kb.design.dto.QueryChartDTO;
import com.kb.design.service.AdminHomeService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;;

/**
 * 管理员首页
 */
@RestController
@RequestMapping("/adminHome")
public class AdminHomeController {

    @Resource
    private AdminHomeService adminHomeService;
    /**
     * 订单信息
     */
    @RequestMapping("/orderCountInfo")
    public ApiResponse orderCountInfo(@RequestBody QueryChartDTO queryChartDTO){
        return ApiResponse.success(adminHomeService.orderCountInfo(queryChartDTO));
    }
    /**
     * 订单数据
     */
    @RequestMapping("/queryOrderData")
    public ApiResponse queryOrderData(@RequestBody QueryChartDTO queryChartDTO){
        return ApiResponse.success(adminHomeService.queryOrderData(queryChartDTO));
    }
    /**
     * 项目信息
     */
    @RequestMapping("/projectNodeInfo")
    public ApiResponse projectNodeInfo(@RequestBody QueryChartDTO queryChartDTO){
        return ApiResponse.success(adminHomeService.projectNodeInfo(queryChartDTO));
    }
}
